package com.xuwenjin.reflection;

public class testClassLoader {
    public static void main(String[] args) throws ClassNotFoundException {
        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
        //系统类加载器
        System.out.println("systemClassLoader = " + systemClassLoader);
//扩展类加载器
        ClassLoader parent = systemClassLoader.getParent();
//根加载器,java获取不到,为null
        ClassLoader parent1 = parent.getParent();
        System.out.println("parent1 = " + parent1);

        ClassLoader classLoader = Class.forName("com.xuwenjin.reflection.testClassLoader").getClassLoader();


        //获取系统的类加载器可以加载的路径
        String property = System.getProperty("java.class.path");
        System.out.println("property = " + property);
    }
}
